<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width">
<script src="/resources/js/jquery.1.9.1.min.js"></script>
<script src="/resources/js/bootstrap.min.js"></script>
<title>Danh sách trúng thưởng</title>
<script>
	$(function() {
		tt_click = function(time){
			switch (time) {
			case 'MONTH':
				$('#tt-content-week').addClass('hide');
				$('#tt-content-month').removeClass('hide');
				$('#week-nav').removeClass('active');
				$('#month-nav').addClass('active');
				break;
			case 'WEEK':
				$('#tt-content-month').addClass('hide');
				$('#tt-content-week').removeClass('hide');
				$('#month-nav').removeClass('active');
				$('#week-nav').addClass('active');
				break;
			default:
				break;
			}
		};
		
		ccgt_click = function(time){
			switch (time) {
			case 'MONTH':
				$('#ccgt-week').addClass('hide');
				$('#ccgt-month').removeClass('hide');
				$('#ccgt-week-nav').removeClass('active');
				$('#ccgt-month-nav').addClass('active');
				break;
			case 'WEEK':
				$('#ccgt-month').addClass('hide');
				$('#ccgt-week').removeClass('hide');
				$('#ccgt-month-nav').removeClass('active');
				$('#ccgt-week-nav').addClass('active');
				break;
			default:
				break;
			}
		};
	});
</script>
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/vi_VN/sdk.js#xfbml=1&version=v2.1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
	<tiles:insertDefinition name="mobileDefaultTemplate">
		<tiles:putAttribute name="body">
			<div id="mainContainer">
				<div class="mainBox">
					<div class="subHeading">
						<h3>Danh Sách Trúng Thưởng</h3>
					</div>
					<div class="bxh-type-nav" style="padding-left: 0">
						<ul id="bxh-type-nav" class="nav nav-pills">
							<li id="month-nav" onclick="tt_click('MONTH')" class="active"
								style="margin-right: 30px; width: 280px"><a>DS đoạt
									giải tháng ${awardMonth[0].awardTime}</a></li>
							<li id="week-nav" onclick="tt_click('WEEK')" style="width: 280px"><a>DS
									đoạt giải tuần ${awardWeek[0].awardTime }</a></li>
						</ul>
					</div>
					<div class="tt-content">
						<div id="tt-content-month" class="tt-content-month">
							<div style="width: 90%; margin: auto;">
								<span class="hot">Chúc mừng các bạn sau đây đã đoạt giải
									thưởng tháng ${awardMonth[0].awardTime}:</span> <br /> <br />
								<div>
									<div style="width: 100%">
										<b>Giải nhất: ${awardMonth[0].awardName}</b><br />
										<div>
											<div>
												<img src="${awardMonth[0].awardImage}">
											</div>
											<div>
												<a href="/photo/${awardMonth[0].troll.id}" class="tt-title">${awardMonth[0].troll.title}</a>
												<div class="item">
													<span>Đăng bởi</span><a href="/uploader/${awardMonth[0].troll.uploader.id}">
															<span class="name">${awardMonth[0].troll.uploader.name}</span>
														</a>
												</div>
											</div>
										</div>
									</div>
									<br/>
									<br/>
									<div style="width: 100%">
										<b>Giải nhì: ${awardMonth[1].awardName}</b><br />
										<div>
											<div>
												<div class="tt-money">${awardMonth[1].awardName}</div>
											</div>
											<div>
												<a href="/photo/${awardMonth[1].troll.id}" class="tt-title"> ${awardMonth[1].troll.title}</a>
												<div class="item">
													<span>Đăng bởi</span><a href="/uploader/${awardMonth[1].troll.uploader.id}">
															<span class="name">${awardMonth[1].troll.uploader.name}</span>
														</a>
												</div>
											</div>
										</div>
									</div>
									<br/>
									<br/>
									<div style="width: 100%">
										<b>Giải ba: ${awardMonth[2].awardName}</b><br />
										<div>
											<div>
												<div class="tt-money">${awardMonth[2].awardName}</div>
											</div>
											<div>
												<a href="/photo/${awardMonth[2].troll.id}" class="tt-title">${awardMonth[2].troll.title}</a>
												<div class="item">
													<span>Đăng bởi</span><a href="/uploader/${awardMonth[2].troll.uploader.id}">
															<span class="name">${awardMonth[2].troll.uploader.name}</span>
														</a>
												</div>
											</div>
										</div>
									</div>

								</div>
							</div>
							<br/>
							<br/>
							<div>
								<h4>Bình luận</h4>
								<div class="fb-comments"
									data-href="http://trollvl.com/giai-thuong/${awardMonth[0].awardTime}"
									data-width="345" data-colorscheme="light"  mobile="auto-detect"></div>
							</div>
						</div>
						
						<div id="tt-content-week" class="tt-content-week hide">
							<div style="width: 90%; margin: auto;">
								<span class="hot">Chúc mừng các bạn sau đây đã đoạt giải
									thưởng tuần ${awardWeek[0].awardTime}:</span> <br /> <br />
								<div>
									<div style="width: 100%">
										<b>Giải nhất: ${awardWeek[0].awardName}</b><br />
										<div>
											<div>
												<div class="tt-money">${awardWeek[0].awardName}</div>
											</div>
											<div >
												<a href="/photo/${awardWeek[0].troll.id}" class="tt-title">${awardWeek[0].troll.title}</a>
												<div class="item">
													<span>Đăng bởi</span><a href="/uploader/${awardWeek[0].troll.uploader.id}">
															<span class="name">${awardWeek[0].troll.uploader.name}</span>
														</a>
												</div>
											</div>
										</div>
									</div>
									<br/>
									<br/>
									<div style="width: 100%">
										<b>Giải nhì: ${awardWeek[1].awardName}</b><br />
										<div>
											<div>
												<div class="tt-money">${awardWeek[1].awardName}</div>
											</div>
											<div>
												<a href="/photo/${awardWeek[1].troll.id}" class="tt-title"> ${awardWeek[1].troll.title}</a>
												<div class="item">
													<span>Đăng bởi</span><a href="/uploader/${awardWeek[1].troll.uploader.id}">
															<span class="name">${awardWeek[1].troll.uploader.name}</span>
														</a>
												</div>
											</div>
										</div>
									</div>

									<div style="width: 100%">
										<b>Giải ba: ${awardWeek[2].awardName}</b><br />
										<div>
											<div>
												<div class="tt-money">${awardWeek[2].awardName}</div>
											</div>
											<div>
												<a href="/photo/${awardWeek[2].troll.id}" class="tt-title">${awardWeek[2].troll.title}</a>
												<div class="item">
													<span>Đăng bởi</span><a href="/uploader/${awardWeek[2].troll.uploader.id}">
															<span class="name">${awardWeek[2].troll.uploader.name}</span>
														</a>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<br/>
							<br/>
							<div>
								<h4>Bình luận</h4>
								<div class="fb-comments"
									data-href="http://trollvl.com/giai-thuong/week"
									data-width="345" data-colorscheme="light"  mobile="auto-detect"></div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</tiles:putAttribute>
	</tiles:insertDefinition>
</body>
</html>